<template>
    <div class="update-gender">
        <van-picker
            show-toolbar
            :default-index="1"
            :columns="columns"
            @confirm="onConfirm"
            @cancel="$emit('close')"
        />
    </div>
</template>
<script>
export default {
    data() {
        return {
            columns: ['男', '女'],
            defaultIndex:this.value
        }
    },
    methods: {
        onConfirm() {
            this.$toast.loading({
                message:'保存中',
                forbidclick:true
            })
            this.$toast.success('保存成功')
            this.$emit('close')
        }
    },
    props:{
        
    }
}
</script>
<style lang="less" scoped>

</style>